from google.appengine.ext import db

#class User(db.Model):
#	user = db.UserProperty()
#	dateAdded = db.DateTimeProperty(auto_now_add=True)
	
class Dataset(db.Model):
	name = db.StringProperty(required=True)
	owner = db.UserProperty()
	sessionId = db.StringProperty()
	dataCentre = db.StringProperty()
	dataCSV = db.TextProperty()
	dateAdded = db.DateTimeProperty(auto_now_add=True)
	dateModified = db.DateTimeProperty(auto_now_add=True)

class Contact(db.Model):
	set = db.ReferenceProperty(required=True, reference_class=Dataset)
	address = db.PostalAddressProperty(required=True)
	name = db.StringProperty()
	email = db.StringProperty()
	geocodeResultJsonOb = db.TextProperty()
	geopoint = db.GeoPtProperty()
	dateAdded = db.DateTimeProperty(auto_now_add=True)
